package demo2;
class A{
    public int a;
    public void fun(){
        System.out.println("父类不带参数的fun()成员方法");
    }
    public void fun2(){
        System.out.println("父类独有的fun2()成员方法");
    }

}

class B extends  A {
    public int b;
    public void fun(int x){
        System.out.println("子类的带一个参数的fun()成员方法");
    }
    public void test(){
        //调用
        fun2();
        fun();
        //fun3();

    }
}
public class javaTest {
    public static void main(String[] args) {
        B b=new B();
        b.fun();
        b.fun(6);
    }
}
